#!/bin/bash

if [ -z $1 ] || [ ! -d $1 ]; then
	path="./shiro/"
else
	path=$1
fi

cd $path
echo "start search"

# 递归函数的实现
function Searchfile()
{
	temp=$(pwd)
	echo romove "$temp"/.svn/
	rm -rf "$temp"/.svn/
 
	dirlist=$(ls)
	for dirname in $dirlist
		do
			if [ -d "$dirname" ]; then
				cd $dirname
				Searchfile
				cd ..
			fi
		done
}

Searchfile

echo done